package top.hepingan.java.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@TableName( "chat_list")
@Accessors (chain = true)
public class ChatList {

    @TableId(type =  IdType.AUTO)
    private Integer id;

    private Long initiateUserId;

    private Long targetUserId;

    private Integer initiateMessage;

    private Integer targetMessage;

    private LocalDateTime createdTime;
    // 最后一条消息
    private String lastMessage;
    // 最后一条消息的时间
    private LocalDateTime lastTime;
}
